﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyParticipation.aspx.cs" Inherits="BEGDC.CC.Web.EZVisit.View.MyParticipation" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register TagPrefix="uc1" TagName="PageNavigation" Src="~/UserControls/PageNavigation.ascx" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title>Alcatel-Lucent Customer Care</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../../css/global.css" type="text/css" rel="stylesheet" />
    <link href="../../css/ezform.css" rel="stylesheet" type="text/css" />

    <script language="JavaScript" type="text/javascript" src="../../js/jquery-1.4.4.min.js"></script>

</head>
<body class="purple-bg">
    <form id="Form1" method="post" runat="server">
    <uc1:PageNavigation ID="PageNavigation1" runat="server"></uc1:PageNavigation>
    <div class="tab-box purplebg_dark">
        <ul class="tab-pos">
            <li><span class="tab-active">My Participation 我参与的任务</span></li>
        </ul>
    </div>
    <div class="fw formbox txt_align_rgt">
        <asp:Button ID="btnExport" runat="server" Text="Export to Excel (导出)" CssClass="btn" OnClick="btnExport_Click" />
    </div>
    <asp:DataGrid ID="dgDrafts" ShowHeader="True" AutoGenerateColumns="False" GridLines="both" runat="server" PageSize="10" AllowPaging="True"
        PagerStyle-Visible="False" AllowSorting="True" CssClass="tablestyle" OnItemCommand="dgDrafts_ItemCommand" OnSortCommand="dgDrafts_SortCommand">
        <ItemStyle CssClass="tbody trwhitebg" />
        <AlternatingItemStyle CssClass="tbody trpurplebg" />
        <HeaderStyle CssClass="thead" />
        <Columns>
            <asp:BoundColumn Visible="False" DataField="AppID" />
            <asp:TemplateColumn HeaderText="Application No.<br/>申请单号" SortExpression="AppNo">
                <ItemTemplate>
                    <a href="#" title="Open Application(打开申请单)" onclick="return openWindow('../ezvrequest.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"AppID") %>')">
                        <%# DataBinder.Eval(Container.DataItem,"AppNo") %></a>
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:TemplateColumn HeaderText="EZVisit No.<br/>EZVisit单号" SortExpression="EZVisitReqNo">
                <ItemTemplate>
                    <a href="#" title="Open Application(打开申请单)" onclick="return openWindow('../ezvrequest.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"AppID") %>')">
                        <%# DataBinder.Eval(Container.DataItem, "EZVisitReqNo")%></a>
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="RequesterNameEN" HeaderText="Applicant<br/>申请人" SortExpression="RequesterNameEN" />
            <asp:BoundColumn DataField="Department" HeaderText="CAT/Branch<br/>总部/分公司" SortExpression="Department" />
            <asp:BoundColumn DataField="Company" HeaderText="Customer Company<br/>客户公司" SortExpression="Company" />
            <asp:BoundColumn DataField="Venue" HeaderText="Venue <br/>地点" SortExpression="Venue">
                <HeaderStyle Width="20%" />
                <ItemStyle Width="20%" />
            </asp:BoundColumn>
            <asp:BoundColumn DataField="RequestedDateFrom" HeaderText="Begin Date<br/>开始时间" SortExpression="RequestedDateFrom" DataFormatString="{0:M/d/yyyy}" />
            <asp:BoundColumn DataField="RequestedDateTo" HeaderText="End Date<br/>结束时间" SortExpression="RequestedDateTo" DataFormatString="{0:M/d/yyyy}" />
            <asp:TemplateColumn HeaderText="Action<br/>操作" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <img src="../../images/COMEDIT.GIF" alt="Open (打开)" onclick="return openWindow('../ezvrequest.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"AppID") %>')"
                        onmouseover="this.style.cursor='hand'" title="Open (打开)" />&nbsp;&nbsp;
                </ItemTemplate>
            </asp:TemplateColumn>
        </Columns>
    </asp:DataGrid>
    <div class="fw padding5 txt_align_rgt">
        <span class="float_lft">Total Records:
            <asp:Label ID="lblRecordCount" runat="server" />
            &nbsp;&nbsp;&nbsp;<img src="../../images/book_open.gif" alt="Page (页码)" title="Page (页码)" />&nbsp;Page:
            <asp:Label ID="lblCurrentPageIndex" runat="server" />&nbsp;/&nbsp;
            <asp:Label ID="lblPageCount" runat="server" />
        </span><span>
            <asp:ImageButton ID="btnPageFirst" runat="server" ImageUrl="~/images/pg_first_inact.gif" ImageAlign="AbsMiddle"
            ToolTip="First Page (第一页)" onclick="btnPageFirst_Click" />
            &nbsp;
            <asp:ImageButton ID="btnPagePrev" runat="server" ImageUrl="~/images/pg_pre_inact.gif" ImageAlign="AbsMiddle"
            ToolTip="Prev Page (上一页)" onclick="btnPagePrev_Click" />
            &nbsp;
            <asp:ImageButton ID="btnPageNext" runat="server" ImageUrl="~/images/pg_next.gif" ImageAlign="absmiddle"
            ToolTip="Next Page (下一页)" onclick="btnPageNext_Click" />
            &nbsp;
            <asp:ImageButton ID="btnPageLast" runat="server" ImageUrl="~/images/pg_last.gif" ImageAlign="absmiddle"
            ToolTip="Last Page (最后一页)" onclick="btnPageLast_Click" />
            &nbsp; Go To Page:
            <asp:TextBox ID="txtPage" runat="server" onmouseover="this.className='txtboxover width40';" onmouseout="this.className='txtbox width40';"
                CssClass="txtbox width40" />
            <asp:ImageButton ID="btnGotoPage" runat="server" ImageUrl="~/images/book_open.gif" ToolTip="Goto Page (转到)"
            onclick="btnGotoPage_Click" /></span>
    </div>
    <asp:Button ID="btnReload" CssClass="hidden" OnClick="btnReload_Click" runat="server" />
    </form>

    <script type="text/javascript">
        $(function() {
            $('#<%= this.dgDrafts.ClientID %> .trwhitebg').mouseover(function() {
                $(this).removeClass('trwhitebg');
                $(this).addClass('trhover');
            }).mouseout(function() {
                $(this).removeClass('trhover');
                $(this).addClass('trwhitebg')
            });
            $('#<%= this.dgDrafts.ClientID %> .trpurplebg').mouseover(function() {
                $(this).removeClass('trpurplebg');
                $(this).addClass('trhover');
            }).mouseout(function() {
                $(this).removeClass('trhover');
                $(this).addClass('trpurplebg');
            })
        });

        function openWindow(url) {
            var w = screen.availWidth - 100;
            var h = screen.availHeight - 100;
            var top = 50;
            var left = 40;
            var title = 'win' + url.substr(url.indexOf('?') + 1).replace('=', '');
            window.open(url, title.toLowerCase(), 'scrollbars=yes,width=' + w + ',height=' + h + ',top=' + top + ',left=' + left + ',resizable=yes');
            return false;
        }

        function RefreshGrid(target) {
            $('#<%= btnReload.ClientID %>').click();
        }

    </script>

</body>
</html>